<template>
  <div class="detail-base-info">
    <div class="goods-title">
      {{ Goods.title }}
    </div>
    <div class="goods-price">
      <span class="newPrice">{{ Goods.realPrice }}</span>
      <div class="discount">{{ Goods.discount }}</div>
      <span class="oldPrice">{{ Goods.oldPrice }}</span>
    </div>
    <div class="columns">
      <span v-for="item in Goods.columns" class="columns-item">
        {{ item }}
      </span>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailBaseInfo",
  props: {
    Goods: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {};
  },
};
</script>

<style scoped>
.goods-title {
  font-size: 18px;
  padding: 10px;
}
.goods-price {
  position: relative;
  height: 40px;
}
.newPrice {
  color: var(--color-tint);
  font-size: 25px;
  line-height: 40px;
  padding: 0 10px;
}
.oldPrice {
  text-decoration: line-through;
  font-size: 18px;
  color: rgb(159, 165, 175);
  margin-left: 55px;
}
.discount {
  position: absolute;
  left: 85px;
  top: 3px;
  background-color: var(--color-tint);
  height: 20px;
  line-height: 16px;
  font-size: 10px;
  border-radius: 9px;
  padding: 3px;
  color: #fff;
  text-align: center;
}
.columns {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  height: 30px;
  line-height: 30px;
}
.columns-item {
  font-size: 14px;
}
</style>
